#include "Thread.hpp"
#include <unistd.h>
#include <vector>
using namespace ThreadModlue;
int main()
{
    std::vector<Thread> threads;
    for (int i = 0; i < 10; i++)
    {
        threads.emplace_back([]()
                             {
while(true){
    char name[128];
    pthread_getname_np(pthread_self(),name,sizeof(name));
    std::cout<<"我是一个新线程： "<<name<<endl;
    sleep(1);
} });
    }
    for (auto &thread : threads)
    {
        thread.start();
    }
    for (auto &thread : threads)
    {
        thread.Join();
    }
}